package za.co.smartmi.dao;

import java.util.Date;
import java.util.List;
import za.co.smartmi.dao.exceptions.ClientDaoException;
import za.co.smartmi.dao.support.JdbcDao;
import za.co.smartmi.model.Client;
import za.co.smartmi.model.ClientPk;

public interface ClientDao extends JdbcDao {

    /**
     * Method 'insert'
     *
     * @param dto
     * @return ClientPk
     */
    public ClientPk insert(Client dto);

    /**
     * Updates a single row in the client table.
     */
    public void update(ClientPk pk, Client dto) throws ClientDaoException;

    /**
     * Deletes a single row in the client table.
     */
    public void delete(ClientPk pk) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the search criteria
     */
    public List<Client> findClientsBySearchCriteria(Client clientSearch) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'clientid
     * = :clientid'.
     */
    public Client findByPrimaryKey(Integer clientid) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria ''.
     */
    public List<Client> findAll() throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'clientid
     * = :clientid'.
     */
    public List<Client> findWhereClientidEquals(Integer clientid) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'firstname
     * = :firstname'.
     */
    public List<Client> findWhereFirstnameEquals(String firstname) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'surname =
     * :surname'.
     */
    public List<Client> findWhereSurnameEquals(String surname) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'idno =
     * :idno'.
     */
    public List<Client> findWhereIdnoEquals(String idno) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'dob =
     * :dob'.
     */
    public List<Client> findWhereDobEquals(Date dob) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'title =
     * :title'.
     */
    public List<Client> findWhereTitleEquals(String title) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'mobile =
     * :mobile'.
     */
    public List<Client> findWhereMobileEquals(String mobile) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'hphone =
     * :hphone'.
     */
    public List<Client> findWhereHphoneEquals(String hphone) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'wphone =
     * :wphone'.
     */
    public List<Client> findWhereWphoneEquals(String wphone) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'email1 =
     * :email1'.
     */
    public List<Client> findWhereEmail1Equals(String email1) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'email2 =
     * :email2'.
     */
    public List<Client> findWhereEmail2Equals(String email2) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'postaddr1
     * = :postaddr1'.
     */
    public List<Client> findWherePostaddr1Equals(String postaddr1) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'postaddr2
     * = :postaddr2'.
     */
    public List<Client> findWherePostaddr2Equals(String postaddr2) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'postaddr3
     * = :postaddr3'.
     */
    public List<Client> findWherePostaddr3Equals(String postaddr3) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'postcode
     * = :postcode'.
     */
    public List<Client> findWherePostcodeEquals(String postcode) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'physaddr1
     * = :physaddr1'.
     */
    public List<Client> findWherePhysaddr1Equals(String physaddr1) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'physaddr2
     * = :physaddr2'.
     */
    public List<Client> findWherePhysaddr2Equals(String physaddr2) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'physaddr3
     * = :physaddr3'.
     */
    public List<Client> findWherePhysaddr3Equals(String physaddr3) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'notes =
     * :notes'.
     */
    public List<Client> findWhereNotesEquals(String notes) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'type =
     * :type'.
     */
    public List<Client> findWhereTypeEquals(String type) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'status =
     * :status'.
     */
    public List<Client> findWhereStatusEquals(String status) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'startdate
     * = :startdate'.
     */
    public List<Client> findWhereStartdateEquals(Date startdate) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'enddate =
     * :enddate'.
     */
    public List<Client> findWhereEnddateEquals(Date enddate) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'csys =
     * :csys'.
     */
    public List<Client> findWhereCsysEquals(String csys) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'cdate =
     * :cdate'.
     */
    public List<Client> findWhereCdateEquals(Date cdate) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'usys =
     * :usys'.
     */
    public List<Client> findWhereUsysEquals(String usys) throws ClientDaoException;

    /**
     * Returns all rows from the client table that match the criteria 'udate =
     * :udate'.
     */
    public List<Client> findWhereUdateEquals(Date udate) throws ClientDaoException;

    /**
     * Returns the rows from the client table that matches the specified
     * primary-key value.
     */
    public Client findByPrimaryKey(ClientPk pk) throws ClientDaoException;
}
